﻿@using BotDetect.Web.UI.Mvc;

@model RegisterViewModel

@Styles.Render(BotDetect.Web.CaptchaUrls.Absolute.LayoutStyleSheetUrl)

@using (Html.BeginForm("Register", "Account", new { role = "form" }))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true, "", new { @class = "text-danger" })

    <div class="form-group">
        @Html.TextBoxFor(m => m.Email, new { @class = "form-control", placeholder = "Email" })
        @Html.ValidationMessageFor(m => m.Email)
    </div>
    <div class="form-group">
        @Html.PasswordFor(m => m.Password, new { @class = "form-control", placeholder = "Mật khẩu" })
        @Html.ValidationMessageFor(m => m.Password)
    </div>
    <div class="form-group">
        @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control", placeholder = "Xác nhận mật khẩu" })
        @Html.ValidationMessageFor(m => m.ConfirmPassword)
    </div>
    <hr />
    <label>Thông tin người dùng</label>
    <div class="form-group">
        @Html.TextBoxFor(m => m.Name, new { @class = "form-control", placeholder = "Họ tên" })
        @Html.ValidationMessageFor(m => m.Name)
    </div>
    <div class="form-group">
        @Html.TextBoxFor(m => m.Phone, new { @class = "form-control", placeholder = "Điện thoại" })
        @Html.ValidationMessageFor(m => m.Phone)
    </div>
    <div class="form-group">
        @Html.TextAreaFor(m => m.Address, new { @class = "form-control", placeholder = "Địa chỉ", Rows = "2" })
        @Html.ValidationMessageFor(m => m.Address)
    </div>
    <div class="form-group">
        @{ MvcCaptcha sampleCaptcha = new MvcCaptcha("SampleCaptcha"); }
        @Html.Captcha(sampleCaptcha)
        <br />
        @Html.TextBox("CaptchaCode", null, new { @class = "form-control", placeholder = "Mã xác nhận" })
        @Html.ValidationMessage("CaptchaCode")
    </div>
    <div class="text-center">
        <button type="submit" class="btn btn-primary" value="Register">
            Đăng ký
        </button>
    </div>
}